package com.SunSoft.PhoneRemoteControl;

import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;
import com.tasogo.comm.c;
import java.util.HashMap;
import java.util.List;

final class dl extends BaseAdapter
{
  private LayoutInflater b;

  public dl(Show_Brand_Select paramShow_Brand_Select)
  {
    this.b = LayoutInflater.from(paramShow_Brand_Select);
    int i = 0;
    if (i >= Show_Brand_Select.a(paramShow_Brand_Select).size())
      return;
    String str2 = ((c)Show_Brand_Select.a(paramShow_Brand_Select).get(i)).c();
    if (i - 1 >= 0);
    for (String str1 = ((c)Show_Brand_Select.a(paramShow_Brand_Select).get(i - 1)).c(); ; str1 = " ")
      while (true)
      {
        if (!(str1.equals(str2)))
        {
          str1 = ((c)Show_Brand_Select.a(paramShow_Brand_Select).get(i)).c();
          Show_Brand_Select.b(paramShow_Brand_Select).put(str1, Integer.valueOf(i));
        }
        i += 1;
      }
  }

  public final int getCount()
  {
    return Show_Brand_Select.a(this.a).size();
  }

  public final Object getItem(int paramInt)
  {
    return Show_Brand_Select.a(this.a).get(paramInt);
  }

  public final long getItemId(int paramInt)
  {
    return paramInt;
  }

  public final View getView(int paramInt, View paramView, ViewGroup paramViewGroup)
  {
    String str;
    if (paramView == null)
    {
      paramView = this.b.inflate(2130903045, null);
      paramViewGroup = new dn(this.a, paramView);
      paramView.setTag(paramViewGroup);
      localObject = (c)Show_Brand_Select.a(this.a).get(paramInt);
      paramViewGroup.b.setText(((c)localObject).a());
      paramViewGroup.c.setText(((c)localObject).b());
      paramViewGroup.c.setTag(Integer.valueOf(paramInt));
      paramViewGroup.b.setTag(Integer.valueOf(paramInt));
      str = ((c)Show_Brand_Select.a(this.a).get(paramInt)).c();
      if (paramInt - 1 < 0)
        break label187;
    }
    label187: for (Object localObject = ((c)Show_Brand_Select.a(this.a).get(paramInt - 1)).c(); !(((String)localObject).equals(str)); localObject = " ")
      while (true)
      {
        paramViewGroup.a.setVisibility(0);
        paramViewGroup.a.setText(str);
        return paramView;
        paramViewGroup = (dn)paramView.getTag();
      }
    paramViewGroup.a.setVisibility(8);
    return ((View)paramView);
  }
}